package org.lss.entity;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.lss.validate.Insert;

import javax.validation.constraints.Email;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@ApiModel("定义接口规范bean")
public class ValidateDefinition {

    @ApiModelProperty("姓名")
    @NotNull(message = "姓名不能为空",groups = {Insert.class})
    private String name;


    @ApiModelProperty("邮箱")
    @Email(message = "邮箱格式不正确",groups = {Insert.class})
    @NotNull(message = "邮箱不能为空",groups = {Insert.class})
    private String email;

    @ApiModelProperty("金额")
    @Max(value = 1000,message = "最大金额不能超过一千",groups = {Insert.class})
    @Min(value=0,message = "最小金额不能低于0",groups = {Insert.class})
    @NotNull(message = "金额不能为空",groups = {Insert.class})
    private Integer money;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }
}
